package work.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import work.entity.Book;
import work.repository.BookRepository;
import work.service.BookService;

@Service
public class BookServiceImpl implements BookService {

    @Autowired
    private BookRepository bookRepository;

    @Override
    public int updatebookStatus1(Book book) {
        return bookRepository.updatebookStatus1(book);
    }

    @Override
    public int updatebookStatus2(Book book) {
        return bookRepository.updatebookStatus2(book);
    }

    @Override
    public int updatebookStatus3(Book book) {
        return bookRepository.updatebookStatus3(book);
    }

    @Override
    public String selectBookIdByBookWareId(String bookWareId) {
        return bookRepository.selectBookIdByBookWareId(bookWareId);
    }

    @Override
    public int insertBook(Book book) {
        return bookRepository.insertBook(book);
    }

    @Override
    public String selectStatusByBookId(String bookId) {
        return bookRepository.selectStatusByBookId(bookId);
    }

    @Override
    public Book selectByBookId(String bookId) {
        return bookRepository.selectByBookId(bookId);
    }
}
